package csu.big_article.anno;

import csu.big_article.validation.StateValidation;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(
        validatedBy = {StateValidation.class}
)//指定校验类
public @interface State {
    //提供校验失败后的提示信息
    String message() default "{state参数的值只能是已发布/草稿}";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
